package com.sxpi.order.feign.api;

import com.sxpi.common.result.R;
import com.sxpi.order.vo.CourseBuyVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author: 董伟豪
 * @Date: 2022/10/25 21:06
 */
@FeignClient(name = "sxpi-service-course")
public interface CourseApiFeign {

    /**
     * 购买商品扣减库存
     * @param courseBuyVo
     * @return
     */
    @PostMapping("/course/updatestore")
    R miniusCourseStore(@RequestBody CourseBuyVo courseBuyVo);

    /**
     * 根据id查询出来的分类信息放入到缓存中
     * @param id
     * @return
     */
    @PostMapping("/course/get/{id}")
    R getCourseDetail(@PathVariable("id")Long id);
}
